// import 'dart:async';
// import 'package:bloc/bloc.dart';
// import 'package:flutter/foundation.dart';
// import 'package:flutter_roujiaosuo/requests/models/SupplyModel.dart';
// import 'package:flutter_roujiaosuo/requests/repository/repository.dart';
// import './bloc.dart';

// class SupplyBlocBloc extends Bloc<SupplyBlocEvent, SupplyBlocState> {

//   final RoujiaosuoRepository roujiaosuoRepository;
//   SupplyBlocBloc({@required this.roujiaosuoRepository}) :assert(roujiaosuoRepository != null),super();

//   @override
//   SupplyBlocState get initialState => InitialSupplyBlocState();
//   @override
//   Stream<SupplyBlocState> mapEventToState(
//     SupplyBlocEvent event,
//   ) async* {
//     // TODO: Add Logic
//     if (event is FetchSupplyList) {
//       yield LoadingSupplyBlocState();
//       try {
//         yield LoadedSupplyBlocState(supply: await roujiaosuoRepository.getSupplyList(event.page));
//       } catch (e) {
//         yield ErrorSupplyBlocState();
//       }
//     }
//   }
// }
